home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2040 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  830 b 

  1. Path: access1.digex.net!not-for-mail
  2. From: ell@access1.digex.net (Ell)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Initializing: a(5) vs. a = 5
  5. Date: 15 Jan 1996 07:11:34 GMT
  6. Organization: The Universe
  7. Message-ID: <4dcun6$fei@news4.digex.net>
  8. NNTP-Posting-Host: access1.digex.net
  9. X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
  10.  
  11. In general, Scott ("when in doubt, be object-oriented" :) Meyer, in
  12. Effective C++, prefers initialization to assignment in constructors.  This
  13. is the only way to initialize object constants, and Meyer sees it as
  14. minimizing "chances of initializing data in an inefficient manner". pg 39 
  15.  
  16. However, Meyer says "it may make sense to use assignment instead of
  17. initialization for large numbers of data members of built-in types, and you
  18. want them all initialized the same way in each constructor." pg 39
  19.  
  20. Elliott
  21.  
  22.  
  23.